package view

var navbar string = `{{define "navbar"}}
<!-- Static navbar -->
    <nav class="navbar navbar-default navbar-static-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">KTV后台</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
            <li{{if eq .tpl "index"}} class="active"{{end}}><a href="/">首页</a></li>            
            <li{{if eq .tpl "online"}} class="active"{{end}}><a href="/ktv/online">在线用户</a></li>
            <li{{if eq .tpl "status"}} class="active"{{end}}><a href="/ktv/status">系统状态</a></li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">工具 <span class="caret"></span></a>
              <ul class="dropdown-menu">
                <li><a href="/ktv/ddns">动态域名DDNS</a></li>                                        
              </ul>
            </li>
          </ul>
          <ul class="nav navbar-nav navbar-right">
            {{if .islogin}}
            <li><a href="/profile">修改密码</a></li>            
            <li><a href="/logout">退出</a></li>
            {{else}}
             <li><a href="/login">登录</a></li>
            {{end}}
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </nav>
   {{end}}`
